<template>
  <div class="Glbol">
    <el-container>
      <el-header>欢迎您，{{username}}</el-header>
      <el-container class="container">
        <el-aside width="200px">
          <Aside :username="username"></Aside>
        </el-aside>
        <el-main>
           <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
// eslint-disable-next-line no-unused-vars
import Aside from './Aside.vue'
export default {
  name: 'Global',
  components: {
    Aside
  },
  data () {
    return {
      username: ''
    }
  },
  created: function () {
    this.username = this.$route.query.username
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped  lang="less">
.Glbol{
  width: 100%;
  height: 100%;
  .container{
    height: calc(100% - 60px) !important;
  }
  >.el-container{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    .el-container{
      display: flex;
      height: 100%;
      .el-main{
        width: 100%;
        background: #fff;
      }
    }
  }
}
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}
.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
}
.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 160px;
}
body > .el-container {
  margin-bottom: 40px;
}
.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}
.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
</style>
